//
//  FourTableViewCell.m
//  Ting
//
//  Created by 安静的美男子 on 14/11/21.
//  Copyright (c) 2014年 安静的美男子. All rights reserved.
//

#import "FourTableViewCell.h"

@implementation FourTableViewCell

- (void)awakeFromNib {
    // Initialization code
    
    
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _view1 = [[FourView alloc]initWithFrame:CGRectMake(5, 5 + 40, 150, 170)];
        _view1.button.tag = 1;
        [self.contentView addSubview:_view1];
        
        
        _view2 = [[FourView alloc]initWithFrame:CGRectMake(5 + 150 + 10 , 5 + 40, 150, 170)];_view2.button.tag = 2;
        [self.contentView addSubview:_view2];
        
        _view3 = [[FourView alloc]initWithFrame:CGRectMake(5, 5 + 170 + 5 + 40, 150, 170)];
        _view3.button.tag = 3;
        [self.contentView addSubview:_view3];
        
        _view4 = [[FourView alloc]initWithFrame:CGRectMake(5 + 150 + 10, 5 + 170 + 5 + 40, 150, 170)];
        _view4.button.tag = 4;
        [self.contentView addSubview:_view4];
        
        self.title = [[UILabel alloc]initWithFrame:CGRectMake(33, 12, 68, 20)];
        
        _title.text = @"最新资讯";
        
        self.image = [[UIImageView alloc]initWithFrame:CGRectMake(5, 12, 20, 20)];
        
        self.more = [UIButton buttonWithType:UIButtonTypeCustom];
        self.more.frame = CGRectMake(265, -2, 40, 50);
        
        _image.image = [UIImage imageNamed:@"findsection_logo@2x.png"];
        [_more setBackgroundImage:[UIImage imageNamed:@"findsection_more_n@2x.png"] forState:UIControlStateNormal];
        
        _header = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 320, 30)];
        
    
        [_header addSubview:_image];
        [_header addSubview:_title];
        [_header addSubview:_more];
        [self.contentView addSubview:_header];
        
        
    }
    return self;
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
